/* 容器 */
.fan-box {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

/* 图片自适应 */
.fan-box img {
  display: block;
  width: 100%;
  height: auto;
}

/* 风扇主体 */
.fan {
  border: 5px solid #000000;
  border-radius: 50%;
}

/* 控制器的样式 */
.control {
  text-align: center;
  margin: 1rem 0px;
}

.control > span {
  display: inline-block;
  border: 1px solid #ff0000;
  border-radius: 0.5rem;
  margin: 0.5rem 0.1rem;
  width: 1.5rem;
  cursor: pointer;
}

.active {
  background-color: #ff0000;
  color: #ffffff;
}

/* 动画 */
@keyframes fan-on {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(1080deg);
  }
}
/* 多档样式 */
.fan1 {
  /* linear:时间曲线为线性，简单的说就是匀速 */
  animation: fan-on 3s infinite linear;
}
.fan2 {
  animation: fan-on 2s infinite linear;
}
.fan3 {
  animation: fan-on 1s infinite linear;
}

@keyframes fan-off {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.fan0 {
  animation: fan-off 1.5s;
}
/* 隐藏音频元素 */
#myaudio {
  width: 0px;
  height: 0px;
}
